package com.qf.advice;
//Spring官方提供的前置通知接口
import org.springframework.aop.BeforeAdvice;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 *
 * 自定义的我的前置通知实现类 （代理实现类）
 * @author lixu
 */
public class MyBeforeAdvice implements MethodBeforeAdvice {


    /**
     * 前置通知方法
     * @param method method being invoked
     * @param args arguments to the method
     * @param target target of the method invocation. May be {@code null}.
     * @throws Throwable
     */
    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        //辅助业务
        System.out.println("1、发布租房信息");
        System.out.println("2、带租户看房");
    }
}
